package cn.pli.bike.ui;

import android.support.v7.widget.RecyclerView;

import com.framemodule.utils.CommonUtils;

import cn.bingoogolapple.androidcommon.adapter.BGARecyclerViewAdapter;
import cn.bingoogolapple.androidcommon.adapter.BGAViewHolderHelper;
import cn.pli.bike.R;
import cn.pli.bike.bean.CreditRecord;
import cn.pli.bike.bean.PrepaidRecord;

/**
 * Created by shangdongzhou on 2017/11/19.
 */

public class PrepaiRecordAdapter extends BGARecyclerViewAdapter<PrepaidRecord> {

    public PrepaiRecordAdapter(RecyclerView recyclerView) {
        super(recyclerView, R.layout.item_credit_detail);
    }

    @Override
    protected void fillData(BGAViewHolderHelper helper, int position, PrepaidRecord model) {

        String title = "";
        switch (model.getPayStatus()) {
            case "0":
                title = "支付成功";
                break;
            case "1":
                title = "未支付";
                break;
            case "2":
                title = "支付失败";
                break;
        }
        helper.getTextView(R.id.tv_item_describe).setText(title);


        helper.getTextView(R.id.tv_item_date).setText(CommonUtils.parseDateTime(model.getOrderTime()));

        helper.getTextView(R.id.tv_scroll_change).setText(""+model.getRechargeAmount());


    }
}
